/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpilibj.templates.commands.HatchStop;

/**
 *
 * @author Wendy Chan
 */
public class Hatch extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    private SpeedController motor;


    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
        setDefaultCommand(new HatchStop());
    }

    public Hatch(){
        motor = new Jaguar(RobotMap.hatchMotor);
    }

    public void hatchOpen(){
        motor.set(1.0);
    }

    public void hatchClose(){
        motor.set(-1.0);
    }

    public void hatchStop(){
        motor.set(0.0);
    }
}